package com.ag.bean;

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbTaskResourse entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_TASK_RESOURSE", schema = "dbo", catalog = "AGDB")
public class TbTaskResourse implements java.io.Serializable {

	// Fields

	private TbTaskResourseId id;
	private TbGoods tbGoods;
	private TbTask tbTask;
	private Integer reNum;
	private Date startTime;
	private Date finishTime;
	private String a;
	private String b;
	private String c;

	// Constructors

	/** default constructor */
	public TbTaskResourse() {
	}

	/** minimal constructor */
	public TbTaskResourse(TbTaskResourseId id, TbGoods tbGoods, TbTask tbTask,
			Integer reNum, Date startTime, Date finishTime) {
		this.id = id;
		this.tbGoods = tbGoods;
		this.tbTask = tbTask;
		this.reNum = reNum;
		this.startTime = startTime;
		this.finishTime = finishTime;
	}

	/** full constructor */
	public TbTaskResourse(TbTaskResourseId id, TbGoods tbGoods, TbTask tbTask,
			Integer reNum, Date startTime, Date finishTime, String a, String b,
			String c) {
		this.id = id;
		this.tbGoods = tbGoods;
		this.tbTask = tbTask;
		this.reNum = reNum;
		this.startTime = startTime;
		this.finishTime = finishTime;
		this.a = a;
		this.b = b;
		this.c = c;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "TId", column = @Column(name = "T_ID", nullable = false, length = 20)),
			@AttributeOverride(name = "goodsId", column = @Column(name = "GOODS_ID", nullable = false, length = 14)) })
	public TbTaskResourseId getId() {
		return this.id;
	}

	public void setId(TbTaskResourseId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GOODS_ID", nullable = false, insertable = false, updatable = false)
	public TbGoods getTbGoods() {
		return this.tbGoods;
	}

	public void setTbGoods(TbGoods tbGoods) {
		this.tbGoods = tbGoods;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "T_ID", nullable = false, insertable = false, updatable = false)
	public TbTask getTbTask() {
		return this.tbTask;
	}

	public void setTbTask(TbTask tbTask) {
		this.tbTask = tbTask;
	}

	@Column(name = "RE_NUM", nullable = false)
	public Integer getReNum() {
		return this.reNum;
	}

	public void setReNum(Integer reNum) {
		this.reNum = reNum;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "START_TIME", nullable = false, length = 23)
	public Date getStartTime() {
		return this.startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FINISH_TIME", nullable = false, length = 23)
	public Date getFinishTime() {
		return this.finishTime;
	}

	public void setFinishTime(Date finishTime) {
		this.finishTime = finishTime;
	}

	@Column(name = "A", length = 60)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 60)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 60)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

}